package com.cloudfun.campusshare.common.model.dto;

import com.cloudfun.campusshare.common.constant.BaseConstant;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

/**
 * Created by Huqin on 2020/5/6
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "账号激活DTO")
public class AccountActivateDTO {

    @ApiModelProperty("验证码")
    @NotNull(message = "请输入验证码")
    private String verifyCode;

    @ApiModelProperty(value = "密码")
    @NotEmpty(message = "密码不能为空")
    @Length(min = 8, max = 20, message = "密码限制8-20个字")
    @Pattern(regexp = BaseConstant.PASSWORD_REGEX_PATTERN, message = "密码格式错误")
    private String password;

}
